package com.tianhui.consignortwofei.api;


import com.fgs.common.CommonResponse;
import com.fgs.common.api.CommonApiService;
import com.fgs.common.entity.CommonDataListInfo;
import com.fgs.common.entity.UpdateInfo;
import com.tianhui.consignortwofei.mvp.model.enty.AccountDetailInfo;
import com.tianhui.consignortwofei.mvp.model.enty.CapitalData;
import com.tianhui.consignortwofei.mvp.model.enty.CaptchaInfo;
import com.tianhui.consignortwofei.mvp.model.enty.ConsignorInfo;
import com.tianhui.consignortwofei.mvp.model.enty.PaymentApplyInfo;
import com.tianhui.consignortwofei.mvp.model.enty.RegisterInfo;
import com.tianhui.consignortwofei.mvp.model.enty.TongHuaLogBean;
import com.tianhui.consignortwofei.mvp.model.enty.UserInfo;
import com.tianhui.consignortwofei.mvp.model.enty.VehicleNearbyInfo;
import com.tianhui.consignortwofei.mvp.model.enty.statistics.DriverCarStatisticalInfo;
import com.tianhui.consignortwofei.mvp.model.enty.statistics.OrderStatisticalInfo;
import com.tianhui.consignortwofei.mvp.model.hetong.HeTongXiaZaiBean;
import com.tianhui.consignortwofei.mvp.model.hetong.ShenPiTiJiaoOneBean;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * api service
 */
public interface AccountApiService extends CommonApiService {



    /// type==1  为 平台管理员    type= 2 货主    3 承运商  4 是司机
    @POST("account/login")
    Observable<CommonResponse> login(@QueryMap Map<String, String> map);

    @GET("account/login")
    Observable<CommonResponse> loginGet(@QueryMap Map<String, String> map);

    //注册
    @POST("smc/customer/register")
    Observable<CommonResponse> register(@Body RegisterInfo driverRegister);

    //获取短信验证码
    @POST("account/getSMSCode")
    Observable<CommonResponse> getAuthCode(@Body CaptchaInfo info);

    //获取用户id
    @GET("account/info")
    Observable<CommonResponse<UserInfo>> userInfo();

    //获取账户信息
//    @GET("smc/customer/getModel")
    @GET("smc/customer/findFirstByCustomerno")
    Observable<CommonResponse<CapitalData>> capitalInfo(@QueryMap Map<String, String> map);

    //修改密码
    @POST("account/updatePwd")
    Observable<CommonResponse> changePassword(@QueryMap Map<String, String> map);

    //忘记密码
    @POST("account/resetPwd")
    Observable<CommonResponse> resetPassword(@QueryMap Map<String, String> map);

    //上传头像
    @POST("account/updateavatar")
    Observable<CommonResponse> uploadHead(@QueryMap Map<String, String> map);

    //账户资金明细列表
    @GET("smc/cumstomercapital/capitalList")
    Observable<CommonResponse<CommonDataListInfo<AccountDetailInfo>>> accountDetailList(@QueryMap Map<String, String> map);

    //付款申请
    @POST("smc/fcsource/subSave")
    Observable<CommonResponse> paymentApply(@Body PaymentApplyInfo applyInfo);

    //付款确认
    @POST("smc/fcsource/balancePayConfirm")
    Observable<CommonResponse> paymentConfirm(@QueryMap Map<String, String> map);

    //获取车辆总数、附近车辆总数
    @GET("smc/drivercar/getRandomCarTotal")
    Observable<CommonResponse<VehicleNearbyInfo>> vehicleNumber();

    //获取货主群组信息
    @GET("smc/customer/findByGroupUserId")
    Observable<CommonResponse<ArrayList<ConsignorInfo>>> consignorGroupList(@QueryMap Map<String, String> map);

    //根据货主Id得到信息
    @POST("smc/customer/loginByUserId")
    Observable<CommonResponse> consignorInfo(@QueryMap Map<String, String> map);

    //司机车辆统计信息
    @GET("smc/drivercar/getDriverOrCarTotal")
    Observable<CommonResponse<DriverCarStatisticalInfo>> driverCarStatisticsInfo(@QueryMap Map<String, String> map);

    //司机车辆统计信息
    @GET("smc/drivercar/getDriverOrCarTotalSlot")
    Observable<CommonResponse<List<DriverCarStatisticalInfo>>> driverCarStatisticsData(@QueryMap Map<String, String> map);

    //单据统计信息
    @GET("smc/ordersource/orderSourceTotal")
    Observable<CommonResponse<List<OrderStatisticalInfo>>> orderStatisticsInfo(@QueryMap Map<String, String> map);

    //单据统计信息
    @GET("smc/ordersource/orderSourceTotalSlot")
    Observable<CommonResponse<List<OrderStatisticalInfo>>> orderStatisticsData(@QueryMap Map<String, String> map);

    //获取版本号
    @GET("versionConsignor/check")
    Observable<CommonResponse<UpdateInfo>> checkUpdate(@QueryMap Map<String, String> map);

    @POST("account/udpateCustomerAndDriverByAccount")
    Observable<CommonResponse> changeDriverPhone(@QueryMap Map<String, String> map);


    //获取通话记录
    @GET("smc/phonerecord/getPhoneRecordlist")
    Observable<CommonResponse<TongHuaLogBean>> getTongHua(@QueryMap Map<String, String> map);

    //获取浏览记录
    @GET("smc/ordersource/history/getHistorylist")
    Observable<CommonResponse<TongHuaLogBean>> getLiuLan(@QueryMap Map<String, String> map);

    //二维码登录网页
    @POST("account/qrcode/login")
    Observable<CommonResponse> setCodeLogin(@QueryMap Map<String, String> map);


    //==============================合同======
    //    @POST("mini/account/login")//合同登录
//    Observable<CommonResponse> login(@QueryMap Map<String, String> map);

    @POST("logout")
    Observable<CommonResponse> loginOut();

//    //获取短信验证码
//    @POST("account/getSMSCode")
//    Observable<CommonResponse> getAuthCode(@Body CaptchaInfo info);
//
//    //获取用户id
//    @GET("mini/account/info")
//    Observable<CommonResponse<UserInfo>> userInfo();
//
//    //忘记密码
//    @POST("account/resetPwd")
//    Observable<CommonResponse> resetPassword(@QueryMap Map<String, String> map);


    //提交合同审批
    @POST("contract/flow/record")
    Observable<CommonResponse> postShenHeInfo(@Body ShenPiTiJiaoOneBean applyInfo);


    //合同审批同意不同意
    @POST("contract/flow/record/saveVerity")
    Observable<CommonResponse> postShenHeIsTong(@Body ShenPiTiJiaoOneBean applyInfo);


    //提交合同审批
    @GET("contract/flow/getFlowStep")
    Observable<CommonResponse<ShenPiTiJiaoOneBean>> getShenHeInfo(@QueryMap Map<String, String> map);

    //下载合同
    @GET("contract/downloadFilePdf")
    Observable<CommonResponse<HeTongXiaZaiBean>> downloadContract(@QueryMap Map<String, String> map);


    //下载合同
    @GET("contract/downloadReceiptFilePdf")
    Observable<CommonResponse<HeTongXiaZaiBean>> downloadPingZheng(@QueryMap Map<String, String> map);



}


